home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9255 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 6c 75 | 73 73 2e 69 73 2e 67 65 |Path: lu|ss.is.ge|
|00000010| 2e 63 6f 6d 21 6e 65 77 | 73 0a 46 72 6f 6d 3a 20 |.com!new|s.From: |
|00000020| 77 65 73 74 6c 65 79 20 | 48 65 73 70 65 74 68 20 |westley |Hespeth |
|00000030| 3c 77 65 73 74 6c 65 79 | 40 69 6e 65 74 70 6f 70 |<westley|@inetpop|
|00000040| 2e 69 73 2e 67 65 2e 63 | 6f 6d 3e 0a 4e 65 77 73 |.is.ge.c|om>.News|
|00000050| 67 72 6f 75 70 73 3a 20 | 63 6f 6d 70 2e 6c 61 6e |groups: |comp.lan|
|00000060| 67 2e 63 2b 2b 0a 53 75 | 62 6a 65 63 74 3a 20 52 |g.c++.Su|bject: R|
|00000070| 65 3a 20 48 65 6c 70 20 | 77 69 74 68 20 63 6f 6e |e: Help |with con|
|00000080| 76 65 72 74 69 6e 67 20 | 73 74 72 69 6e 67 20 74 |verting |string t|
|00000090| 6f 20 66 6c 6f 61 74 2c | 20 70 6c 65 61 73 65 21 |o float,| please!|
|000000a0| 21 21 0a 44 61 74 65 3a | 20 54 68 75 2c 20 32 39 |!!.Date:| Thu, 29|
|000000b0| 20 46 65 62 20 31 39 39 | 36 20 31 31 3a 31 34 3a | Feb 199|6 11:14:|
|000000c0| 35 37 20 2d 30 35 30 30 | 0a 4f 72 67 61 6e 69 7a |57 -0500|.Organiz|
|000000d0| 61 74 69 6f 6e 3a 20 47 | 45 20 49 6e 66 6f 72 6d |ation: G|E Inform|
|000000e0| 61 74 69 6f 6e 20 53 65 | 72 76 69 63 65 73 2c 20 |ation Se|rvices, |
|000000f0| 49 6e 63 2e 0a 4d 65 73 | 73 61 67 65 2d 49 44 3a |Inc..Mes|sage-ID:|
|00000100| 20 3c 33 31 33 35 44 31 | 30 31 2e 31 44 45 38 40 | <3135D1|01.1DE8@|
|00000110| 69 6e 65 74 70 6f 70 2e | 69 73 2e 67 65 2e 63 6f |inetpop.|is.ge.co|
|00000120| 6d 3e 0a 52 65 66 65 72 | 65 6e 63 65 73 3a 20 3c |m>.Refer|ences: <|
|00000130| 34 68 32 30 38 6c 24 61 | 6a 61 40 6e 65 77 73 31 |4h208l$a|ja@news1|
|00000140| 2e 73 75 6e 62 65 6c 74 | 2e 6e 65 74 3e 0a 4e 4e |.sunbelt|.net>.NN|
|00000150| 54 50 2d 50 6f 73 74 69 | 6e 67 2d 48 6f 73 74 3a |TP-Posti|ng-Host:|
|00000160| 20 77 68 65 73 70 65 74 | 68 70 63 2e 69 73 2e 67 | whespet|hpc.is.g|
|00000170| 65 2e 63 6f 6d 0a 4d 69 | 6d 65 2d 56 65 72 73 69 |e.com.Mi|me-Versi|
|00000180| 6f 6e 3a 20 31 2e 30 0a | 43 6f 6e 74 65 6e 74 2d |on: 1.0.|Content-|
|00000190| 54 79 70 65 3a 20 74 65 | 78 74 2f 70 6c 61 69 6e |Type: te|xt/plain|
|000001a0| 3b 20 63 68 61 72 73 65 | 74 3d 75 73 2d 61 73 63 |; charse|t=us-asc|
|000001b0| 69 69 0a 43 6f 6e 74 65 | 6e 74 2d 54 72 61 6e 73 |ii.Conte|nt-Trans|
|000001c0| 66 65 72 2d 45 6e 63 6f | 64 69 6e 67 3a 20 37 62 |fer-Enco|ding: 7b|
|000001d0| 69 74 0a 58 2d 4d 61 69 | 6c 65 72 3a 20 4d 6f 7a |it.X-Mai|ler: Moz|
|000001e0| 69 6c 6c 61 20 32 2e 30 | 20 28 57 69 6e 39 35 3b |illa 2.0| (Win95;|
|000001f0| 20 49 29 0a 54 6f 3a 20 | 4b 65 76 69 6e 20 3c 6b | I).To: |Kevin <k|
|00000200| 62 65 72 72 79 40 73 61 | 66 65 66 65 64 2e 6f 72 |berry@sa|fefed.or|
|00000210| 67 3e 0a 0a 4b 65 76 69 | 6e 20 77 72 6f 74 65 3a |g>..Kevi|n wrote:|
|00000220| 0a 3e 20 0a 3e 20 49 20 | 6e 65 65 64 20 74 6f 20 |.> .> I |need to |
|00000230| 70 61 72 73 65 20 75 70 | 20 61 20 73 74 72 69 6e |parse up| a strin|
|00000240| 67 20 61 6e 64 20 70 65 | 72 66 6f 72 6d 20 63 61 |g and pe|rform ca|
|00000250| 6c 63 75 6c 61 74 69 6f | 6e 73 20 6f 6e 20 74 68 |lculatio|ns on th|
|00000260| 65 20 76 61 72 69 61 62 | 6c 65 73 2e 0a 3e 20 0a |e variab|les..> .|
|00000270| 3e 20 74 61 6b 65 20 74 | 68 69 73 20 73 74 72 69 |> take t|his stri|
|00000280| 6e 67 20 63 68 61 72 20 | 2a 51 75 65 72 79 3d 22 |ng char |*Query="|
|00000290| 41 50 52 3d 38 2e 39 26 | 54 45 52 4d 3d 35 26 41 |APR=8.9&|TERM=5&A|
|000002a0| 4d 4f 55 4e 54 3d 31 30 | 30 30 30 22 0a 3e 20 0a |MOUNT=10|000".> .|
|000002b0| 3e 20 48 6f 77 20 77 6f | 75 6c 64 20 49 20 70 61 |> How wo|uld I pa|
|000002c0| 72 73 65 20 69 74 20 75 | 70 20 61 6e 64 20 74 61 |rse it u|p and ta|
|000002d0| 6b 65 20 6f 75 74 20 74 | 68 65 20 6e 75 6d 62 65 |ke out t|he numbe|
|000002e0| 72 73 20 73 6f 20 49 20 | 63 61 6e 20 75 73 65 20 |rs so I |can use |
|000002f0| 74 68 65 6d 20 69 6e 20 | 66 6c 6f 61 74 69 6e 67 |them in |floating|
|00000300| 0a 3e 20 70 6f 69 6e 74 | 20 63 61 6c 63 75 6c 61 |.> point| calcula|
|00000310| 74 69 6f 6e 73 3f 0a 3e | 20 54 68 65 6e 20 49 20 |tions?.>| Then I |
|00000320| 6e 65 65 64 20 74 6f 20 | 70 75 74 20 74 68 65 6d |need to |put them|
|00000330| 20 62 61 63 6b 20 69 6e | 20 61 20 73 74 72 69 6e | back in| a strin|
|00000340| 67 20 66 6f 72 20 6f 75 | 74 70 75 74 2e 0a 3e 20 |g for ou|tput..> |
|00000350| 0a 3e 20 41 6e 79 20 68 | 65 6c 70 20 77 6f 75 6c |.> Any h|elp woul|
|00000360| 64 20 62 65 20 67 72 65 | 61 74 6c 79 20 61 70 70 |d be gre|atly app|
|00000370| 72 65 63 69 61 74 65 64 | 2e 0a 3e 20 0a 3e 20 54 |reciated|..> .> T|
|00000380| 68 61 6e 6b 73 2c 0a 3e | 20 4b 65 76 69 6e 0a 3e |hanks,.>| Kevin.>|
|00000390| 20 6b 62 65 72 72 79 40 | 73 61 66 65 66 65 64 2e | kberry@|safefed.|
|000003a0| 6f 72 67 0a 0a 4b 65 76 | 69 6e 2c 0a 0a 54 68 65 |org..Kev|in,..The|
|000003b0| 20 6b 65 79 20 77 6f 75 | 6c 64 20 62 65 20 6b 6e | key wou|ld be kn|
|000003c0| 6f 77 69 6e 67 20 77 68 | 65 72 65 20 74 68 65 20 |owing wh|ere the |
|000003d0| 6e 75 6d 62 65 72 73 20 | 61 72 65 20 6f 72 20 64 |numbers |are or d|
|000003e0| 65 74 65 63 74 69 6e 67 | 20 77 68 65 72 65 20 74 |etecting| where t|
|000003f0| 68 65 20 0a 6e 75 6d 62 | 65 72 73 20 61 72 65 20 |he .numb|ers are |
|00000400| 69 65 2e 20 69 6e 20 79 | 6f 75 72 20 73 61 6d 70 |ie. in y|our samp|
|00000410| 6c 65 20 73 74 72 69 6e | 67 20 69 74 20 61 70 70 |le strin|g it app|
|00000420| 65 61 72 73 20 74 68 61 | 74 20 74 68 65 20 6e 75 |ears tha|t the nu|
|00000430| 6d 62 65 72 73 20 61 6c | 77 61 79 73 0a 63 6f 6d |mbers al|ways.com|
|00000440| 65 20 61 66 74 65 72 20 | 74 68 65 20 65 71 75 6c |e after |the equl|
|00000450| 61 20 73 69 67 6e 2e 20 | 49 66 20 74 68 61 74 20 |a sign. |If that |
|00000460| 77 65 72 20 61 6c 77 61 | 79 73 20 74 68 65 20 63 |wer alwa|ys the c|
|00000470| 61 73 65 2c 20 49 20 77 | 6f 75 6c 64 20 77 72 69 |ase, I w|ould wri|
|00000480| 74 65 0a 61 20 6c 6f 6f | 70 20 74 68 61 74 20 67 |te.a loo|p that g|
|00000490| 6f 65 73 20 74 68 72 6f | 75 67 20 74 68 65 20 73 |oes thro|ug the s|
|000004a0| 74 72 69 6e 67 20 75 6e | 74 69 6c 20 74 68 65 20 |tring un|til the |
|000004b0| 22 3d 22 20 63 68 61 72 | 63 74 65 72 20 69 73 20 |"=" char|cter is |
|000004c0| 66 6f 75 6e 64 2e 0a 49 | 20 77 6f 75 6c 64 20 74 |found..I| would t|
|000004d0| 68 65 6e 20 75 73 65 20 | 61 6e 74 6f 74 68 65 72 |hen use |antother|
|000004e0| 20 6c 6f 6f 70 20 74 6f | 20 65 78 74 72 61 63 74 | loop to| extract|
|000004f0| 20 74 68 65 20 6e 75 6d | 62 65 72 20 63 68 61 72 | the num|ber char|
|00000500| 61 63 74 65 72 73 20 75 | 6e 74 69 6c 20 0a 73 6f |acters u|ntil .so|
|00000510| 6d 65 74 68 69 6e 67 20 | 6f 74 68 65 72 20 74 68 |mething |other th|
|00000520| 65 6e 20 61 20 6e 75 6d | 62 65 72 20 69 73 20 66 |en a num|ber is f|
|00000530| 6f 75 6e 64 2e 20 54 68 | 65 20 61 73 63 69 69 20 |ound. Th|e ascii |
|00000540| 63 6f 64 65 73 20 66 6f | 72 20 74 68 65 20 6e 75 |codes fo|r the nu|
|00000550| 6d 62 65 72 73 20 0a 30 | 20 74 68 72 6f 75 67 68 |mbers .0| through|
|00000560| 20 39 20 61 72 65 20 34 | 38 20 74 68 72 6f 75 67 | 9 are 4|8 throug|
|00000570| 68 20 35 39 2e 20 53 6f | 20 69 66 20 63 68 61 72 |h 59. So| if char|
|00000580| 20 21 3d 20 34 38 20 74 | 68 72 6f 75 67 68 20 35 | != 48 t|hrough 5|
|00000590| 39 20 28 63 20 77 69 6c | 6c 0a 64 6f 20 74 68 65 |9 (c wil|l.do the|
|000005a0| 20 63 6f 6e 76 65 72 73 | 69 6f 6e 29 2c 20 79 6f | convers|ion), yo|
|000005b0| 75 20 64 6f 6e 74 20 68 | 61 76 65 20 61 20 6e 75 |u dont h|ave a nu|
|000005c0| 6d 62 65 72 2e 20 4f 6e | 63 65 20 74 68 65 20 6e |mber. On|ce the n|
|000005d0| 75 6d 62 65 72 20 69 73 | 20 65 78 74 72 61 63 74 |umber is| extract|
|000005e0| 65 64 0a 69 74 20 63 61 | 6e 20 62 65 20 63 6f 6e |ed.it ca|n be con|
|000005f0| 76 65 72 74 65 64 20 74 | 6f 20 61 20 66 6c 6f 61 |verted t|o a floa|
|00000600| 74 20 75 73 69 6e 67 20 | 74 68 65 20 61 74 6f 66 |t using |the atof|
|00000610| 20 28 63 6f 6e 76 65 72 | 74 20 73 74 72 69 6e 67 | (conver|t string|
|00000620| 20 74 6f 20 61 20 0a 66 | 6c 6f 61 74 29 20 66 75 | to a .f|loat) fu|
|00000630| 6e 63 74 69 6f 6e 2e 20 | 43 6f 6e 74 61 63 74 20 |nction. |Contact |
|00000640| 6d 65 20 69 66 20 79 6f | 75 20 73 74 69 6c 6c 20 |me if yo|u still |
|00000650| 6e 65 65 64 20 6d 6f 72 | 65 20 64 65 74 61 69 6c |need mor|e detail|
|00000660| 73 2e 0a 0a 09 09 09 57 | 65 73 74 6c 65 79 20 4c |s......W|estley L|
|00000670| 2e 20 48 65 73 70 65 74 | 68 0a 09 09 09 53 65 70 |. Hespet|h....Sep|
|00000680| 74 68 20 53 6f 66 74 77 | 61 72 65 0a |th Softw|are. |
+--------+-------------------------+-------------------------+--------+--------+